export default {
  namespaced:true,//开启命名空间
  state:{
    address:JSON.parse(uni.getStorageSync('address') || '{}')
  },
  mutations:{
    updataAddress(state,address){//更新收货地址
      state.address = address;
      this.commit('User/saveAddress')
    },
    saveAddress(state){//存本地
      uni.setStorageSync('address',JSON.stringify(state.address))
    }
  },
  actions:{
   
  },
  getters:{
  addstr(state){
    return state.address.provinceName+state.address.cityName+state.address.countyName+state.address.detailInfo;
  }
  }
}
// state:()=>({})